package com.mz.mattress.client.task.pojo;

import com.alibaba.fastjson.support.spring.FastJsonRedisSerializer;
import com.mz.mattress.client.task.TaskStepBean;
import lombok.Data;
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;

import java.io.Serializable;

@Data
public class MemberStepBean extends TaskStepBean implements Serializable {

    private static final long serialVersionUID = 1L;

    private String mobile;

    private String memberId;


    public static void main(String[] args) {

        MemberStepBean stepBean = new MemberStepBean();
        stepBean.setCurrStep(3);
        stepBean.setTotalStep(5);
        stepBean.setMobile("dd");

//        Jackson2JsonRedisSerializer<MemberStepBean> serializer = new Jackson2JsonRedisSerializer<MemberStepBean>(MemberStepBean.class);
//        byte[] serialize = serializer.serialize(stepBean);
//        System.out.println(serialize.length);
//        MemberStepBean bean = serializer.deserialize(serialize);
//        System.out.println(bean.getMobile());

//        FastJsonRedisSerializer<MemberStepBean> serializer = new FastJsonRedisSerializer<>(MemberStepBean.class);
//        byte[] serialize = serializer.serialize(stepBean);
//        System.out.println(serialize.length);
//        MemberStepBean obj = serializer.deserialize(serialize);
//        System.out.println(obj.getMobile());

    }
}
